//
//  UIView+Image.m
//  MXDK
//
//  Created by guoshikeji_a on 2018/5/18.
//  Copyright © 2018年 chen. All rights reserved.
//

#import "UIView+Image.h"

@implementation UIView (Image)


/**
 获取截图
 */
+ (UIImage *)snapshotSingleView:(UIView *)view
{
    //获取指定View的图片
    UIGraphicsBeginImageContextWithOptions(view.bounds.size, NO, 0.0);
    CGContextRef context = UIGraphicsGetCurrentContext();
    [view.layer renderInContext:context];
    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    return image;
}

@end
